import React from 'react';
import '../common/TopNavBar.css';

interface TopNavBarProps {
  currentTime: string;
}

/**
 * 顶部导航栏组件
 * @param props 组件属性
 * @returns 顶部导航栏JSX
 */
const TopNavBar: React.FC<TopNavBarProps> = ({ currentTime }) => {
  return (
    <div className="top-nav">
      <div className="platform-title">
        <span>机房可视化运维平台</span>
        <span style={{ fontSize: '12px', color: '#94a3b8', marginLeft: '8px' }}>|</span>
        <span style={{ fontSize: '12px', color: '#94a3b8' }}>MACHINE ROOM VISUALIZATION PLATFORM</span>
      </div>
      <div className="platform-time">
        {currentTime}
      </div>
    </div>
  );
};

export default TopNavBar;